package com.wiloon.java8x.basic.finalize;

/**
 * Created by wiloon on 6/17/17;
 */
public class Finalize {
    static int i = 0;
    static int d = 0;

    public Finalize () {
        i++;
        System.out.println("No. " + i +" is constructed.");
    }

    public void finalize() {
        d++;
        System.out.println("No. " + d + " is destroyed.");
    }
}